package max.ta.data.plot.data;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class DimensionHolder<ELEMENT> {

    private final List<ELEMENT> elements = new ArrayList<ELEMENT>();

    public void addAll(List<ELEMENT> element) {
	this.elements.addAll(element);
    }

    public void add(ELEMENT element) {
	this.elements.add(element);
    }

    public List<ELEMENT> getElements() {
	return Collections.unmodifiableList(elements);
    }

    public ELEMENT getElement(int index) {
	return elements.get(index);
    }

    public int getSize() {
	return elements.size();
    }

    public void clear() {
	elements.clear();
    }
}
